package com.futures.investm.adapter;

import com.futures.investm.R;
import com.futures.investm.utils.DateUtil;
import com.avos.avoscloud.AVObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.ArrayList;

public class MessageAdapter extends BaseQuickAdapter<AVObject, BaseViewHolder> {

    public MessageAdapter() {
        super(R.layout.item_message, new ArrayList<AVObject>());
    }

    @Override
    protected void convert(BaseViewHolder helper, AVObject item) {

        helper.setText(R.id.tv_time,DateUtil.formatTime(item.getCreatedAt()));
        helper.setText(R.id.tv_title,item.getString("title"));
        helper.setText(R.id.tv_content,item.getString("content"));

    }
}
